~-::paranoidToggle()
~=:: nextTarget()
~`:: Autorun()
~XButton1::AltR()
~XButton2:: AltJ()


!d::Rezz()
!1:: Skirmish()
!2::Pause 
!3::Reload
!4:: Rawr()
!5:: teste()
!6:: printMousePos()

!8:: aberezz()
!9:: infoTrader()
!0::setCamera(5)

F10:: init()
F11:: turnShitIn()
F12:: spamClick()

teste() {
	;tpToZone(17, 5 )
	;AutoMove(50,50,35)
	;closeShit()
	
	globalVars()
	global active_id
	;global gpid
	;setPid()
	;msgbox %gpid%
	
	i:=1
	while (i<=60) {
		;setCamera(i)
	    i++
		tooltip, i
		;sleep, 1000
	}
	;setZoom(20)
	
	hp:=getHp(1)  
	active:=getActiveChar()
	cursor:=ReadCursor()
	x:=getX()
	y:=getY()
	mapid:=getMapID()
	mpDeficit:=getMPDeficit()
	hpDeficit:=getHPDeficit()
	dead:=getDeadMercs()
	ABStatus:=getABStatus()
	abNL:=getABNumber()
	;setTarget(5)
	getDistance()
	tooltip, ABStatus:%ABStatus% ABN:%abNL% hp:%hp% active:%active% x:%x% y:%y% mapid:%mapid% mpdef:%mpDeficit% hpdef:%hpDeficit% dead:%dead% cursor:%cursor%, 0 , 0
	sleep, 2000
	}
	
setHuntingSpot() {
	global
	automapid:=354 ; se -1 auto-run back off.
	autox:=99
	autoy:=90
	
	automapid2:=342
	autox2:=129
	autoy2:=53
	
	automapid3:=-1
	autox3:=-1
	autoy3:=-1
	
	static paranoid:=0

}

globalVars() {
	global
	
	;CONFIG
	;default
	
	mpthreshold:=5000
	ABTimer:=120
	stuckLimit:=12
	cursordelay:=75
	battlespeed:=500
	runspeed:=20
	numberofmercs:=9
	skipturn:=4
	
	

	
	maxdistance:=60 ; triggers automove se tiver longe D+ do spot , -1 disable
	
	;232 mutantes
	; 344, 116, 159 TBS women's village
	;354 , 99, 90 TBS shogun
	;358 , 123 , 137 TBS frozen
	;342 , 129 , 53 TBS detroit
	; 271 , 61 , 81 aztec trees

	
	;AI
	action_main_0:="skip"
	action_main_2:="cast"
	
	action_monk_0:="attack"
	action_monk_2:="guard"
	action_monk_4:="awaken"
	
	action_lk_0:="attack"
	action_lk_2:="guard"
	
	action_art_0:="skip"
	action_art_2:="cast"
	
	action_elementalista_0:="skip"
	action_elementalista_2:="cast"
	
	action_prophet_0:="attack"
	action_prophet_2:="guard"
	action_prophet_4:="attack"
	
	action_oracle_0:="guard"
	
	action_jani_0:="attack"
	
	action_inventor_0:="attack"

	action_sword_0:="attack"
	action_sword_2:="guard"
	
	action_princess_0:="attack"
	action_princess_2:="guard"
	action_princess_4:="attack"
	
	action_hwarang_0:="attack"
	action_hwarang_2:="guard"
	action_hwarang_4:="attack"
	
	action_viking_0:="attack"
	;action_viking_2:="guard"
	action_viking_4:="attack"
	
	action_spartan_0:="attack"
	action_spartan_2:="guard"
	action_spartan_4:="attack"
	
	action_tarkan_0:="attack"
	action_tarkan_2:="guard"
	action_tarkan_4:="attack"
	
	action_sheriff_0:="attack"
	action_sheriff_2:="guard"
	action_sheriff_4:="attack"
	
	action_exo_0:="attack"
	action_exo_2:="guard"
	
	action_bt_0:="attack"
	action_bt_2:="guard"
	action_bt_4:="cast"
	
	action_canhoneiro_0:="skip"
	action_canhoneiro_2:="cast"
	
	action_champion_0:="attack"
	action_champion_2:="guard"
	
	action_witch_0:="skip"
	action_witch_2:="guard"
	action_witch_4:="cast"
	
	action_druid_0:="attack"
	action_druid_2:="guard"
	action_druid_4:="attack"
	
	action_unknown_0:="attack"
	
	
	gpid:=-1
	

	
	 if (charname="Ravock") `
	{	
		mpthreshold:=5000
		ABTimer:=120
		stuckLimit:=12
		cursordelay:=75
		battlespeed:=500
		runspeed:=20
		numberofmercs:=9
		skipturn:=4
	}
	
	else if (charname="Apsalar") `
	{	
		mpthreshold:=5000
		ABTimer:=120
		stuckLimit:=12
		cursordelay:=75
		battlespeed:=500
		runspeed:=20
		numberofmercs:=9
		skipturn:=-1
	}
	
	else if (charname="Mirenna") `
	{	
		mpthreshold:=5000
		ABTimer:=60
		skipturn:=-1
		battlespeed:=500
		cursordelay:=50
		stuckLimit:=12
		automapid:=-1 ; se -1 auto-run back off.
		autox:=305
		autoy:=361
		action_tarkan_2:="attack"
	}
	
	;MOB COORDS
	
	x_1:=540
	x_2:=590
	x_3:=640
	x_4:=540
	x_5:=590
	x_6:=640
	x_7:=540
	x_8:=590
	x_9:=640
	x_10:=370
	x_11:=420
	x_12:=470
	x_13:=370
	x_14:=420
	x_15:=470
	x_16:=370
	x_17:=420
	x_18:=470
	x_19:=720
	x_20:=770
	x_21:=820
	x_22:=720
	x_23:=770
	x_24:=820
	x_25:=720
	x_26:=770
	x_27:=820
	
	y_1:=517
	y_2:=517
	y_3:=517
	y_4:=570
	y_5:=570
	y_6:=570
	y_7:=621
	y_8:=621
	y_9:=621
	y_10:=517
	y_11:=517
	y_12:=517
	y_13:=570
	y_14:=570
	y_15:=570
	y_16:=621
	y_17:=621
	y_18:=621
	y_19:=517
	y_20:=517
	y_21:=517
	y_22:=570
	y_23:=570
	y_24:=570
	y_25:=621
	y_26:=621
	y_27:=621
	
	;ALT-F COORDS
	
xf_top_left_1:=500
xf_top_left_2:=580
xf_top_left_3:=670
xf_top_left_4:=500
xf_top_left_5:=580
xf_top_left_6:=670
xf_top_left_7:=500
xf_top_left_8:=580
xf_top_left_9:=670
yf_top_left_1:=250
yf_top_left_2:=250
yf_top_left_3:=250
yf_top_left_4:=370
yf_top_left_5:=370
yf_top_left_6:=370
yf_top_left_7:=490
yf_top_left_8:=490
yf_top_left_9:=490
xf_bottom_right_1:=570
xf_bottom_right_2:=650
xf_bottom_right_3:=740
xf_bottom_right_4:=570
xf_bottom_right_5:=650
xf_bottom_right_6:=740
xf_bottom_right_7:=570
xf_bottom_right_8:=650
xf_bottom_right_9:=740
yf_bottom_right_1:=350
yf_bottom_right_2:=350
yf_bottom_right_3:=350
yf_bottom_right_4:=470
yf_bottom_right_5:=470
yf_bottom_right_6:=470
yf_bottom_right_7:=590
yf_bottom_right_8:=590
yf_bottom_right_9:=590

;MERC BATTLE COORDS
	xm_9:=540
	xm_8:=590
	xm_7:=640
	xm_6:=540
	xm_5:=590
	xm_4:=640
	xm_3:=540
	xm_2:=590
	xm_1:=640
	ym_9:=307
	ym_8:=307
	ym_7:=307
	ym_6:=360
	ym_5:=360
	ym_4:=360
	ym_3:=411
	ym_2:=411
	ym_1:=411

}

setWindowID() {
	global active_id:=
	WinGet, active_id, ID, A
	
}



	





